package com.zjj.filmcommentapi.service.impl;

import com.zjj.filmcommentapi.dao.MovieMapper;
import com.zjj.filmcommentapi.model.Movie;
import com.zjj.filmcommentapi.service.MovieService;
import com.zjj.filmcommentapi.utils.CodeMsg;
import com.zjj.filmcommentapi.utils.Result;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class MovieServiceImpl implements MovieService {
    @Resource
    private MovieMapper movieMapper;

    @Override
    public Result addMovie(Movie movie) {
        if (movieMapper.insertSelective(movie)!=0){
            return Result.success("添加成功",200);
        }else {
            return Result.error(CodeMsg.BIND_ERROR);
        }
    }

    @Override
    public Result updateMovie(Movie movie) {
        return null;
    }

    @Override
    public Result getMovie(Movie movie) {
        return null;
    }

    @Override
    public Result getMovieList(Movie movie) {
        return null;
    }
}
